home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 26 / Cream of the Crop 26.iso / program / nasm095s.zip / STANDARD.MAC < prev    next >
Text File  |  1997-07-27  |  1KB  |  78 lines

  1. ; Standard macro set for NASM 0.95
  2.  
  3. %define __NASM_MAJOR__ 0
  4. %define __NASM_MINOR__ 95
  5.  
  6. %define __SECT__        ; it ought to be defined, even if as nothing
  7.  
  8. %imacro section 1+.nolist
  9. %define __SECT__ [section %1]
  10.       __SECT__
  11. %endmacro
  12. %imacro segment 1+.nolist
  13. %define __SECT__ [segment %1]
  14.       __SECT__
  15. %endmacro
  16.  
  17. %imacro absolute 1+.nolist
  18. %define __SECT__ [absolute %1]
  19.       __SECT__
  20. %endmacro
  21.  
  22. %imacro struc 1.nolist
  23. %push struc
  24. %define %$strucname %1
  25. [absolute 0]
  26. %endmacro
  27. %imacro endstruc 0.nolist
  28. %{$strucname}_size:
  29. %pop
  30. __SECT__
  31. %endmacro
  32.  
  33. %imacro istruc 1.nolist
  34. %push istruc
  35. %define %$strucname %1
  36. %$strucstart:
  37. %endmacro
  38. %imacro at 1-2+.nolist
  39.       times %1-($-%$strucstart) db 0
  40.       %2
  41. %endmacro
  42. %imacro iend 0.nolist
  43.       times %{$strucname}_size-($-%$strucstart) db 0
  44. %pop
  45. %endmacro
  46.  
  47. %imacro extern 1+.nolist
  48. [extern %1]
  49. %endmacro
  50.  
  51. %imacro bits 1+.nolist
  52. [bits %1]
  53. %endmacro
  54.  
  55. %imacro global 1+.nolist
  56. [global %1]
  57. %endmacro
  58.  
  59. %imacro common 1+.nolist
  60. [common %1]
  61. %endmacro
  62.  
  63. %imacro org 1+.nolist
  64. [org %1]
  65. %endmacro
  66.  
  67. %imacro group 1+.nolist
  68. [group %1]
  69. %endmacro
  70.  
  71. %imacro uppercase 1+.nolist
  72. [uppercase %1]
  73. %endmacro
  74.  
  75. %imacro library 1+.nolist
  76. [library %1]
  77. %endmacro
  78.